package net.sky.oa.test.dao.addrbook;

import java.util.List;

import javax.annotation.Resource;

import net.sky.oa.dao.addrbook.AddAddrgroupDao;
import net.sky.oa.model.AddAddrgroup;
import net.sky.oa.test.BaseTestCase;

import org.junit.Test;
import org.springframework.test.annotation.Rollback;

public class AddAddrgroupDaoTestCase extends BaseTestCase {

	@Resource
	private AddAddrgroupDao addAddrgroupDao;

	@Test
	@Rollback(false)
	public void add() {
		AddAddrgroup addAddrgroup = new AddAddrgroup();
		addAddrgroup.setSort(1);
		this.addAddrgroupDao.save(addAddrgroup);
	}

	@Test
	@Rollback(false)
	public void find() {

		List<AddAddrgroup> addrgroups = this.addAddrgroupDao.findAllAddrgroup();
		for (AddAddrgroup addrgroup : addrgroups) {
			System.out.println("getSort:" + addrgroup.getSort());
		}
	}
}